package Homework.Homework04;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class StudentTest {

    public static void main(String[] args) {

            List<Student> list = new ArrayList<>();
            while (true) {
                System.out.println("****       学生信息管理系统        ****");
                System.out.println("****        1.添加学生信息         ****");
                System.out.println("****        2.查询学生信息         ****");
                System.out.println("****        3.修改学生信息         ****");
                System.out.println("****        4.删除学生信息         ****");
                System.out.println("****        5.打印学生信息         ****");
                System.out.println("****        6.退出系统             ****");
                Scanner sc = new Scanner(System.in);
                System.out.println("请选择模块并输入所对应的数字，按回车进入！");
                String s = sc.nextLine();
                switch (s) {
                    case "1":
                        AddStudent.addStudent(list);
                        break;
                    case "2":
                        SeekStudent.selStudent(list);
                        break;
                    case "3":
                        RiviseStudent.riviseStudent(list);
                        break;
                    case "4":
                        RemoveStudent.deleteStudent(list);
                        break;
                    case "5":
                        PrintStudent.printStudent(list);
                        break;
                    case "6":
                        System.out.println("成功退出系统！");
                        break;
                }
            }
        }
    }